clear
set more off
version 17

********************************************************************************
***** The Short and Long Term Effects of In-Person Performance Feedback:
***** Evidence from a Large Bus Driver Coaching Program
********************************************************************************
***** Journal of Political Economy Microeconomics
********************************************************************************
***** Adriaan R. Soetevent and Gert-Jan Romensen
********************************************************************************
***** Master-file * 3.2 Analysis
********************************************************************************
***** Latest update: 28-04-2025
********************************************************************************

global filepath "C:\JPEMicReplication"
global paperpath "$filepath\TablesGraphs"
cd "$filepath\Do-files"
set scheme s2color

ssc install diff

ssc install eventstudyinteract

ssc install avar

ssc install ftools

/*** 1. Assesses whether the phase-in of coaching was done in a quasi-random manner. [WARNING: Running this code takes very long] ***/

do X01-Coachvsnocoachdescriptives

/*** 2. Creates some descriptive figures of the data ***/

do X02-BasicPictures

/*** 3. Analysis on tailored performance feedback ***/

do X03-RegrPeerComp

/*** 4. Analysis on the effects of in person feedback, first file for Treatment region, second for Control region. ***/

do X04-RegressionsCoachingFR
do X04-RegressionsCoachingZH

	*  Analysis on the effects of in person feedback, Sun and Abrahams (2021) CATT analysis [Treatment region] ***/
	
	*  - Time Invariant Effects

do X04-RegressionsCoachingCATTstatic

	*  - Dynamic Treatment Effects

do X04-RegressionsCoachingCATT

	* 4b. Robustness check:  Rush Hours Excluded as Control Variables [Table N.16]

do X04b-RegressionsCoachingRobustRushFR

/*** 5. Short cost-benefit analysis of coaching program ***/

do X05-CostBenefitAnalysisCoaching

/*** 6. Some basic regressions on the determinants of fuel economy and comfort and estimation (EB-adjusted) driver quality metrics ***/

do X06-BasicRegressions

/*** 7. Testing for some heterogeneity in treatment effect coaching: salience of effort and fatigue ***/

do X07-HetEffectsCoaching

/*** 8. Testing for heterogeneous treatment effects conditional on pre-coaching productivity ***/

do X08-HetEffectCoachingProductivity

/*** 9. Analysis Eco Coach Survey Data ***/

do X09-AnalysisSurvey

